
import { RouteObject } from 'react-router-dom'
import { Suspense, lazy } from 'react';
import AuthRoute from './AuthRoute';
import Loading from './Loading';



const Layout_0=lazy(()=>import('@/views/_layout.tsx'));
const Layout_1=lazy(()=>import('@/views/detail/_layout.tsx'));
const Layout_2=lazy(()=>import('@/views/user/_layout.tsx'));
const App_0_0=lazy(()=>import('@/views/index'));
const App_0_1=lazy(()=>import('@/views/app/index'));
const App_0_2=lazy(()=>import('@/views/detail/_layout'));
const App_0_3=lazy(()=>import('@/views/user/a'));
const App_0_4=lazy(()=>import('@/views/user/b'));
const App_0_5=lazy(()=>import('@/views/user/blog.w.o.layout'));
const App_0_6=lazy(()=>import('@/views/user/index'));
const App_0_7=lazy(()=>import('@/views/user/_layout'));
const App_0_8=lazy(()=>import('@/views/detail/__id/index'));
const App_0_9=lazy(()=>import('@/views/detail/__id/info'));
const App_1_0=lazy(()=>import('@/views/detail/__id/index'));
const App_1_1=lazy(()=>import('@/views/detail/__id/info'));
const App_2_0=lazy(()=>import('@/views/user/a'));
const App_2_1=lazy(()=>import('@/views/user/b'));
const App_2_2=lazy(()=>import('@/views/user/blog.w.o.layout'));
const App_2_3=lazy(()=>import('@/views/user/index'));

type CustomRouteObject = RouteObject & {

}


export const routes=[
  {path: "/", element: <AuthRoute><Suspense fallback={<Loading />}><Layout_0 /></Suspense></AuthRoute>, children: [  {path: "/", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_0 /></Suspense></AuthRoute>},  {path: "/app", element: <Suspense fallback={<Loading />}><App_0_1 /></Suspense>},  {path: "/detail/_layout", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_2 /></Suspense></AuthRoute>},  {path: "/user/a", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_3 /></Suspense></AuthRoute>},  {path: "/user/b", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_4 /></Suspense></AuthRoute>},  {path: "/user/blog/w/o/layout", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_5 /></Suspense></AuthRoute>},  {path: "/user", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_6 /></Suspense></AuthRoute>},  {path: "/user/_layout", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_7 /></Suspense></AuthRoute>},  {path: "/detail/:id", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_8 /></Suspense></AuthRoute>},  {path: "/detail/:id/info", element: <AuthRoute><Suspense fallback={<Loading />}><App_0_9 /></Suspense></AuthRoute>},]}, 
  {path: "/detail", element: <AuthRoute><Suspense fallback={<Loading />}><Layout_1 /></Suspense></AuthRoute>, children: [  {path: "/detail/:id", element: <AuthRoute><Suspense fallback={<Loading />}><App_1_0 /></Suspense></AuthRoute>},  {path: "/detail/:id/info", element: <AuthRoute><Suspense fallback={<Loading />}><App_1_1 /></Suspense></AuthRoute>},]}, 
  {path: "/user", element: <AuthRoute><Suspense fallback={<Loading />}><Layout_2 /></Suspense></AuthRoute>, children: [  {path: "/user/a", element: <AuthRoute><Suspense fallback={<Loading />}><App_2_0 /></Suspense></AuthRoute>},  {path: "/user/b", element: <AuthRoute><Suspense fallback={<Loading />}><App_2_1 /></Suspense></AuthRoute>},  {path: "/user/blog/w/o/layout", element: <AuthRoute><Suspense fallback={<Loading />}><App_2_2 /></Suspense></AuthRoute>},  {path: "/user", element: <AuthRoute><Suspense fallback={<Loading />}><App_2_3 /></Suspense></AuthRoute>},]}, 
] as CustomRouteObject[];


export default routes;
